package com.woniuxy.commons.factory;

import com.woniuxy.commons.entity.TestPaper;
import com.woniuxy.commons.service.RemotePaperService;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * @Author: 曾令忠
 * @Description:
 * @Date: 2020/7/21 0021-上午 9:51
 */
@Component
public class RemotePaperServiceFactory implements FallbackFactory {
    @Override
    public RemotePaperService create(Throwable throwable) {
        return new RemotePaperService() {
            @Override
            public TestPaper getPaperById(Long paperID) {
                return null;
            }

            @Override
            public long insertPaper(TestPaper testPaper) {
                return 0;
            }
        };
    }
}
